home *** CD-ROM | disk | FTP | other *** search
- Path: ix.netcom.com!news
- From: jhewett@ix.netcom.com (Jerry Hewett)
- Newsgroups: comp.lang.c++
- Subject: Re: How do you reset a file?
- Date: Mon, 08 Apr 96 17:01:52 GMT
- Organization: Netcom
- Message-ID: <N.040896.100152.46@ix.netcom.com>
- References: <3162b143.399039@news.airmail.net>
- NNTP-Posting-Host: tem-ca1-01.ix.netcom.com
- X-NETCOM-Date: Mon Apr 08 12:02:22 PM CDT 1996
- X-Newsreader: Quarterdeck Message Center [2.00]
-
- > This might be a stupid question, but I couldn't find the answer in
- > either of the C++ books I have. How do you reset an fstream object
- > back to the beginning of the file?
-
- <stream handle>.seekg (0L,ios::beg)?
-
- (The reason for the question mark is that I'm new to C++, so I might have
- munged the syntax)
-
- Check out "seekg" and "seekp" in your documentation, in any case.
-
- Jerry H.
-
-
-
-